# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.contrib import admin
from settings import WEB_PATH


# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Home:
    url(r'^$','apps.views.home',name='home'),
    url(r'^list/$','apps.views.home',name='home'),
    url(r'^list/(?P<page_index>[\d]+)/$','apps.views.home',name='home_list'),

    url(r'^blogs/$','apps.views.blogs',name='home_blogs'),

    url(r'^signup$','apps.views.signup',name='signup'),
    url(r'^signup/active.html','apps.views.signup_active',name='signup_active'),
    url(r'^signin$','apps.views.signin',name='signin'),
    url(r'^signout$','apps.views.signout',name='signout'),


    # Blogs:
    (r'^user/',include('apps.blog.urls')),

    # Admin:
    (r'^admin/r/', include('django.conf.urls.shortcut')),
    (r'^admin/(.*)',admin.site.root),

    # Third App:
    #
    # Other:
    (r'^static/(.*)','django.views.static.serve', {'document_root': '%s/static/' % WEB_PATH}),
    (r'^static/(.*)','middleware.dynamic_media_serve.serve',{'document_root':'%s/static/' % WEB_PATH}),

)
